from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="AspectRatio", title="4Components", description="3")
def aspect_ratio() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/aspect_ratio.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)


@template(route="Box", title="4Components", description="3")
def box() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/box.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Card", title="4Components", description="3")
def card() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/card.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Center", title="4Components", description="3")
def center() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/center.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Container", title="4Components", description="3")
def container() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/container.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Flex", title="4Components", description="3")
def flex() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/flex.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Fragment", title="4Components", description="3")
def fragment() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/fragment.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Grid", title="4Components", description="3")
def grid() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/grid.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Html", title="4Components", description="3")
def html() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/html.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Spacer", title="4Components", description="3")
def spacer() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/spacer.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Stack", title="4Components", description="3")
def stack() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/stack.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Wrap", title="4Components", description="3")
def wrap() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/layout/wrap.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)